package com.msyy.tj_message.controller;

import org.apache.commons.lang.time.DateUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @Classname HelloController
 * @Description TODO
 * @Date 2020/5/13 19:57
 * @Created by You
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

    public static void main(String[] args) throws ParseException {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        String dateStr = sdf.format(new Date()) + " 17:00:00";
//        Date date1 = sdf1.parse(dateStr);
//
//        Calendar cal = Calendar.getInstance();
//        cal.setTime(date1);
//        cal.add(Calendar.DATE,-7);
//        System.out.println(cal.getTime());
    }

}
